<!DOCTYPE html>
<html lang="zh-CN">
<meta charset="utf-8" />
<head>
<title>媒体管理 <?php echo $this->config->item('title');?>
</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet"
	href="<?php echo base_url()?>public/css/bootstrap.min.css">
<link rel="stylesheet"
	href="<?php echo base_url()?>public/css/style.css">
	<script src="<?php echo base_url()?>public/js/jquery-2.0.2.min.js"></script>
	<script src="<?php echo base_url()?>public/js/bootstrap.min.js"></script>
	<script src="<?php echo base_url()?>public/js/bootstrap-confirm.js"></script>
	<script src='<?php echo base_url()?>public/js/ssi_common.js'></script>
</head>
<body>
	<div role="navigation" class="navbar navbar-inverse navbar-fixed-top">
		<div class="container">
			<div class="navbar-header">
				<a class="navbar-brand">SSI后台管理系统</a>
			</div>
			<div class="collapse navbar-collapse navbar-right">
				<ul class="nav navbar-nav">
					<li><a href="<?php echo base_url()?>" class="navbar-link">首页</a>
					</li>
					<li><a
						href="<?php echo base_url()."index.php/common_login_user_set"?>"
						class="navbar-link">超级管理员</a>
					</li>
					<li><a
						href="<?php echo base_url()?>index.php/common_login_manage/logout"
						class="navbar-link">退出</a>
					</li>
				</ul>
			</div>
		</div>
	</div>
	<div class="container">
		<div class="row">
			<div class="col-xs-3">
				<?php echo $user_menu?>
			</div>
			<div class="col-sm-9">
				<ul class="nav nav-tabs">
					<li 
					<?php echo $media_type=="common"?"class=\"active\"":"";?>
					><a
						href="<?php echo base_url()."index.php/website_featured_media"?>">精选市区大牌</a>
					</li>
					<li
					<?php echo $media_type=="led"?"class=\"active\"":"";?>><a
						href="<?php echo base_url()."index.php/website_featured_media?media_type=led"?>">精选LED大屛</a>
					</li>
					<li
					<?php echo $media_type=="highway"?"class=\"active\"":"";?>
					><a
						href="<?php echo base_url()."index.php/website_featured_media?media_type=highway"?>">精选高速大牌</a>
					</li>
				</ul>
				<br>
				<div class="panel panel-default">
					<div class="panel-heading">
						<div class="dropdown">
							<button id="addMenu" type="button" data-toggle="dropdown"
								class="btn btn-link dropdown-toggle pull-right">
								<span class="glyphicon glyphicon-plus"> </span><span> 添加</span>
							</button>
							<ul role="menu" aria-labelledby="addMenu"
								class="dropdown-menu pull-right">
								<li role="presentation">
									<a role="menuitem"	href="<?php echo base_url()."index.php/website_featured_media/add_featured_media?media_type=common"?>">市区大牌</a>
								</li>
								<li role="presentation">
									<a role="menuitem"	href="<?php echo base_url()."index.php/website_featured_media/add_featured_media?media_type=led"?>">LED大屛</a>
								</li>
								<li role="presentation">
									<a role="menuitem" 	href="<?php echo base_url()."index.php/website_featured_media/add_featured_media?media_type=highway"?>">高速大牌</a>
								</li>
							</ul>
						</div>
						<p>&nbsp;</p>
					</div>
				</div>
				<div class="panel-body">
					<table class="table table-hover">
						<thead>
							<tr>
								<td class="col-md-2"><b>媒体编号</b>
								</td>
								<td class="col-md-2"><b>媒体类型</b>
								</td>
								<td class="col-md-5"><b>媒体位置</b>
								</td>
								<td class="col-md-1"><b>排序号</b>
								</td>
								<td class="col-md-2"><b>操作</b>
								</td>
							</tr>
						</thead>
						<tbody>
							<?php if ($featured_media_list!=null) {
								foreach ($featured_media_list as $media){
								?>
							<tr>
								<td><?php echo $media['media_id'] ?>
								</td>
								<td><?php if ($media['media_type']=="led") {
									echo "市区LED大牌";
								}elseif ($media['media_type']=="common") {
									echo "市区常规大牌";
								}elseif ($media['media_type']=="highway") {
									echo "高速公路大牌";
								}elseif ($media['media_type']=="airport") {
									echo "机场大牌";
								}?>
								</td>
								<td><?php echo $media['location'] ?>
								</td>
								<td><?php echo $media['sort_num'] ?>
								</td>
								<td>
								<a title="编辑"
									href="<?php echo base_url()."index.php/website_featured_media/edit_featured_media?featured_id=".$media['featured_id']?>"
									class="btn btn-link"> <span class="glyphicon glyphicon-pencil"></span>
								</a>
								
								<a title="删除"
									rel="<?php echo base_url()."index.php/website_featured_media/delete_featured_media?featured_id=".$media['featured_id']?>"
									class="btn btn-link confirm"> <span
										class="glyphicon glyphicon-trash"></span>
								</a>
								</td>
							</tr>
							<?php }
								}?>
						</tbody>
					</table>
				</div>
			</div>
		</div>
	</div>
	</div>
	<script>$('.confirm[rel]').each(function() {
 $(this).confirm({
  'title' : '是否确认删除',
  'message' : '该操作无法恢复，请再次确认！',
  'action' : $(this).attr('rel')
 });
});</script>
<div  class="back-to" id="toolBackTop">
	<a title="返回顶部" onclick="window.scrollTo(0,0);return false;" href="#top" class="back-top">
	返回顶部</a>
	<a title="返回底部" onclick="window.scrollTo(0,document.body.scrollHeight);return false;" href="#bottom" class="back-bottom">
	返回底部</a>
</div>
</body>
</html>
